<?php
/*
	更换背景音乐
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
set_html('title','更换背景音乐');
if($_RQ['op']=='main'){
	$list=$this->getall('music',array('uniacid'=>$_SESSION['uniacid']));
	$return['list']=$list;
	exi($return);
}
if($_RQ['op']=='post'){
	$post=get_postdata();
	if(!$post['music']){
		exi('请先选择音乐！','error');
	}
	$this->update('card',array('music'=>trim($post['music'])),array('mid'=>$_SESSION['uid']));
	exi('设置成功！','','goback');
}